Link
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Manual: Link Establishment in Detail ↗
A link is a special destination type that provides a bidirectional, encrypted communication tunnel between two nodes, over any number of hops.
Links are very efficient. The total bandwidth cost of setting up a link is 3 packets (297 bytes) while the cost of keeping a link alive is 0.45 bits/second.cite-ref-0-1-1[1]
Contents
Usage
With RNS:
# Initiator
link = RNS.Link(destination)
link.set_packet_callback(initiator_packet_received)
link.set_link_established_callback(initiator_link_established)
link.set_link_closed_callback(initiator_link_closed)
# Responder
def client_connected(link):
link.set_packet_callback(responder_packet_received)
link.set_link_closed_callback(responder_link_closed)
link.set_remote_identified_callback(remote_identified)
For a more comprehensive use case, see the Link example in the manual.
See also
References
cite-note-0-11. ↑ Reaching the Destination, Manual. a8d24177d946de4f1f0a0fe1af9a1338:/page/blob.mu ↗
Reticulum concepts
Announce • Blackhole • Buffer • Channel • Destination • Discovery • Identity • Instance • Interface • Interface Access Code (IFAC) • Link • Network identity • Node • Packet • Path • Propagation node • Resource • Stamp • Transport node
Link